//
//  NSString+CS.h
//
//  Created by wujian on 2016/12/29.
//  Copyright © 2016年 wujian. All rights reserved.
//

#import <Foundation/Foundation.h>
@interface NSString (CS)
/**
 *  32位MD5加密
 *
 *  @return 32位MD5加密结果
 */
- (NSString *)MD5;

/**
 *  SHA1加密
 *
 *  @return SHA1加密结果
 */
- (NSString *)SHA1;

/**是否为手机号*/
- (BOOL)isMobileNumber;

/**
 *  返回字符串所占用的尺寸
 *
 *  @param font    字体
 *  @param maxSize 最大尺寸
 */
- (CGSize)sizeWithFont:(UIFont *)font maxSize:(CGSize)maxSize;

/**url编码*/
-(NSString *)URLEncodeString;

/**url解码*/
-(NSString *)URLDecodeString;

/**去掉字符串中的空白字符*/
- (NSString *)trimString;

/**是否市空字符串*/
- (BOOL)isEmptyString;

/**
 *  将十六进制的编码转为emoji字符
 */
+ (NSString *)emojiWithIntCode:(int)intCode;

/**
 *  将十六进制的编码转为emoji字符
 */
+ (NSString *)emojiWithStringCode:(NSString *)stringCode;

/**
 *  是否为emoji字符
 */
- (BOOL)isEmoji;

/**
 *  根据日期算星座
 */
+ (NSString *)stringByGetAstroWithDate:(NSDate *)date;


-(id)JSONValue;

/**
 *  根据日期算年龄
 */
+ (NSString *)stringByAgeWithDateOfBirth:(NSDate *)date;

/**
 *去掉表
 */
+ (NSString*)disable_EmojiString:(NSString *)text;


/**
 *日期增加
 */
- (NSString*)addDayWith:(NSInteger )dayCount;

/**
 *日期增加
 */
- (NSString*)addHourWith:(NSInteger )hourCount andMin:(NSInteger )minCount;


/**
 * 计算日期差
 **/
+ (NSDateComponents *)getDateDifference:(NSString *)date;

- (int)getDateMinWithOtherDate:(NSString *)date;

+ (NSDateComponents *)getDateDifferenceWithStartDate:(NSString *)startDate andDate:(NSString *)date;

@end
